<script setup lang="ts">
import Navbar from '@renderer/layouts/dialog/navbar.vue'
import { ref } from 'vue'

import { useRouter } from 'vue-router'
const route = useRouter()
const title = ref<string>('')
let currentPageName = route.currentRoute.value.name as WindowNameType
title.value = route.currentRoute.value.query.title as string
</script>

<template>
  <main class="flex flex-col h-screen nodrag" style="overflow-x: hidden;">
    <div class="fixed z-[999] top-0 w-[100%] drag">
      <Navbar :windowName="currentPageName" :title="title" />
    </div>
    <section class="flex flex-1 pt-10 overflow-hidden">
      <div class="flex-1 overflow-y-auto bg-white">
        <router-view #default="{ Component, route }">
          <component :is="Component" :key="route.fullPath" />
        </router-view>
      </div>
    </section>
  </main>
</template>
